home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / term / trms20c.lha / Floppy_Install < prev    next >
Text File  |  1993-10-07  |  20KB  |  470 lines

  1. (set vernum (getversion "libs:version.library"))
  2. (set ver (/ vernum 65536))
  3. (set rev (- vernum (* ver 65536)))
  4. (complete 0)
  5.  
  6. (set @default-dest "")
  7. (if (strlen (getassign "TERMINUS" "a"))
  8.    (
  9.       (set rem_flag
  10.          (askbool
  11.             (prompt
  12.                "The logical assignment \"TERMINUS\" is present, it must be unassigned "
  13.                "before the installation can continue."
  14.             )
  15.             (help 
  16.                "Select \"Remove\" to remove"
  17.                "this assignment or \"Abort\" to abort this script."
  18.             )
  19.             (default 1)
  20.             (choices "Remove" "Abort")
  21.          )
  22.       )
  23.       (if (= rem_flag 0)
  24.          (abort "User aborted installation.")
  25.          (run "Assign TERMINUS:")
  26.       )
  27.    )
  28. )
  29.  
  30. (message
  31.    "This floppy installation script is used to create or update an AmigaDOS 1.3, 2.0 "
  32.    "or 2.1 boot floppy and a Terminus program disk.\n\n"
  33.    "To do so you will need to boot from a copy of your Workbench disk (or your "
  34.    "boot floppy) before installation can continue.\n\n"
  35.    "The Terminus program disk will be created/updated first.  If updating, please "
  36.    "insert the Terminus program disk, which must be labled \"TERMINUS\" before proceeding."
  37. )
  38.  
  39. (set is_update 0)
  40. (set term-dest (getassign "TERMINUS" "v"))
  41.  
  42. (if (strlen term-dest)
  43.    (
  44.       (set is_update 
  45.          (askbool
  46.             (prompt 
  47.                "The volume \"TERMINUS:\" is present in \""
  48.                (getdevice term-dest)
  49.                ":\".\n\n  Do you want the update installed there?"
  50.             )
  51.             (help @askchoice-help)
  52.             (choices "Proceed" "Abort")
  53.             (default 1)
  54.          )
  55.       )
  56.       (if (= is_update 0)
  57.          (abort "User aborted installation.")
  58.       )
  59.    )
  60. )
  61.  
  62. (if (= is_update 0)
  63.    (
  64.       (until (getassign "TERMINUS" "v")
  65.          (
  66.             (message "Please insert a formatted, blank disk in drive DF0:")
  67.             (run "relabel drive DF0: TERMINUS")
  68.             (delete (tackon term-dest ".info") (optional "force"))
  69.             (message 
  70.                "The disk in DF0: has been relabeled as \"TERMINUS\".  Please "
  71.                "wait a few seconds for the drive activity LED to go out then "
  72.                "remove and finally reinsert the disk to update the system so "
  73.                "that the \"TERMINUS\" volume name is present.  Proceed once "
  74.                "the disk LED has extinguished."
  75.             )
  76.          )
  77.       )
  78.       (set term-dest (getassign "TERMINUS" "v"))
  79.    )
  80. )
  81.  
  82. (set @execute-dir (pathonly @icon))
  83. (makeassign "TERMINST" @execute-dir)
  84. (set script-dest (tackon term-dest "Scripts"))
  85.  
  86. (if (not (exists script-dest))
  87.    (makedir script-dest)
  88. )
  89.  
  90. (makeassign "TERMTEMP" script-dest)
  91. (working "Extracting Terminus scripts...")
  92. (set exec-lha (tackon "TERMINST:" "bin/lha -mx e "))
  93. (set exec-part (tackon "TERMINST:" "ScriptFiles TERMTEMP:"))
  94. (run (cat exec-lha exec-part))
  95.  
  96. (complete 10)
  97.  
  98. (makeassign "TERMTEMP" term-dest)
  99. (working "Extracting Terminus executable files...")
  100. (set exec-part (tackon "TERMINST:" "ExecFiles TERMTEMP:"))
  101. (run (cat exec-lha exec-part))
  102.  
  103. (complete 20)
  104.  
  105. (working "Extracting Terminus documentation files...")
  106. (set exec-part (tackon "TERMINST:" "DocFiles TERMTEMP:"))
  107. (run (cat exec-lha exec-part))
  108. (makeassign "TERMTEMP")
  109. (makeassign "TERMINST")
  110.  
  111. (if (exists "keyfile")
  112.    (copyfiles
  113.       (source "keyfile")
  114.       (dest "TERMINUS:")
  115.    )
  116. )
  117.  
  118. (complete 30)
  119.  
  120. (set make_boot 
  121.    (askchoice
  122.       (prompt 
  123.          "Please insert the boot disk to be created or updated in drive DF0: now.  Next, "
  124.          "select the appropriate choice from the list below.\n\n"
  125.          "If you are updating a boot disk you will need approximately 140k of free space "
  126.          "for the necessary fonts and libraries that will be copied to it."
  127.       )
  128.       (choices "Update" "AmigaDOS 1.3" "AmigaDOS 2.0" "AmigaDOS 2.1")
  129.       (default 0)
  130.       (help @askchoice-help)
  131.    )
  132. )
  133.          
  134. (set boot-dest "DF0:")
  135. (if (not (= make_boot 0))
  136.    (
  137.       (message
  138.          "The disk installed DF0: is about to be modified.  All unneccesary files are going to "
  139.          "be deleted.  Are you certain that you want to continue with this installation?\n\n"
  140.          "CAUTION -- DO NOT USE YOUR ORIGINAL WORKBENCH DISK!"
  141.       )
  142.       (set n 0)
  143.       (if (= make_boot 1)
  144.          (
  145.             (while (set thisfile (select n "c/Ask" 
  146.                                              "c/DiskChange"
  147.                                              "c/DiskDoctor"
  148.                                              "c/Edit"
  149.                                              "c/Lock"
  150.                                              "c/Protect"
  151.                                              "c/Quit"
  152.                                              "c/RemRAD"
  153.                                              "c/Sort"
  154.                                              "c/Which"
  155.                                              "c/Why"
  156.                                              "System/FixFonts"
  157.                                              "System/FixFonts.info"
  158.                                              "System/InitPrinter"
  159.                                              "System/InitPrinter.info"
  160.                                              "System/MergeMem"
  161.                                              "System/MergeMem.info"
  162.                                              "System/NoFastMem"
  163.                                              "System/NoFastMem.info"
  164.                                              "Prefs/CopyPrefs"
  165.                                              "Prefs/CopyPrefs.info"
  166.                                              "Prefs/Pointer.info"
  167.                                              "Prefs/Serial.info"
  168.                                              "l/Aux-Handler"
  169.                                              "l/FastFileSystem"
  170.                                              "l/Pipe-Handler"
  171.                                              "l/Speak-Handler"
  172.                                              "devs/narrator.device"
  173.                                              "s/Startup-Sequence"
  174.                                              "s/Startup-Sequence.HD"
  175.                                              "s/StartupII"
  176.                                              "fonts/ruby/12"
  177.                                              "fonts/ruby/15"
  178.                                              "fonts/ruby/8"
  179.                                              "fonts/opal/12"
  180.                                              "fonts/opal/9"
  181.                                              "fonts/sapphire/14" 
  182.                                              "fonts/sapphire/19"
  183.                                              "fonts/diamond/12"
  184.                                              "fonts/diamond/20"
  185.                                              "fonts/garnet/16"
  186.                                              "fonts/garnet/9"
  187.                                              "fonts/emerald/17"
  188.                                              "fonts/emerald/20"
  189.                                              "fonts/diamond.font"
  190.                                              "fonts/emerald.font"
  191.                                              "fonts/garnet.font"
  192.                                              "fonts/opal.font"
  193.                                              "fonts/ruby.font"
  194.                                              "fonts/sapphire.font"
  195.                                              "fonts/diamond"
  196.                                              "fonts/emerald"
  197.                                              "fonts/garnet"
  198.                                              "fonts/opal"
  199.                                              "fonts/ruby"
  200.                                              "fonts/sapphire"
  201.                                              "libs/mathieeedoubbas.library"
  202.                                              "libs/mathieeedoubtrans.library"
  203.                                              "libs/mathtrans.library"
  204.                                              "libs/translator.library"
  205.                                              "Empty"
  206.                                              "Utilities/.info"
  207.                                              "Utilities/Calculator"
  208.                                              "Utilities/Calculator.info"
  209.                                              "Utilities/Clock"
  210.                                              "Utilities/Clock.info"
  211.                                              "Utilities/ClockPtr"
  212.                                              "Utilities/ClockPtr.info" 
  213.                                              "Utilities/CMD"
  214.                                              "Utilities/Cmd.info"
  215.                                              "Utilities/InstallPrinter"
  216.                                              "Utilities/InstallPrinter.info"
  217.                                              "Utilities/Notepad"
  218.                                              "Utilities/Notepad.info"
  219.                                              "Utilities/Say"
  220.                                              "Utilities/Say.info"
  221.                                              "Expansion"
  222.                                              "Empty.info"
  223.                                              "Expansion.info"
  224.                                              ""))
  225.                (
  226.                   (set n (+ n 1))
  227.                   (working "Deleting file: " thisfile)
  228.                   (delete (tackon boot-dest thisfile) (optional "force"))
  229.                )
  230.             )
  231.  
  232.             (working "Building Startup-sequence script file...")
  233.             (textfile
  234.                (dest (tackon boot-dest "s/startup-sequence"))
  235.                (append
  236.                   "echo \"Terminus 2.0 boot disk for Workbench 1.3\"\n"
  237.                   "version\n"
  238.                   "c:SetPatch >NIL: r\n"
  239.                   "Addbuffers df0: 10\n"
  240.                   "Binddrivers\n"
  241.                   "FF >NIL: -0\n"
  242.                   "Sys:System/FastMemFirst\n"
  243.                   "resident CLI L:Shell-Seg SYSTEM pure add\n"
  244.                   "mount newcon:\n"
  245.                   "makedir ram:t\n"
  246.                   "assign T: ram:t\n"
  247.                   "makedir ram:env\n"
  248.                   "assign ENV: ram:env\n"
  249.                   "makedir ram:clipboards\n"
  250.                   "assign CLIPS: ram:clipboards\n"
  251.                   "SYS:System/SetMap usa1\n"
  252.                   "path ram: c: s: sys:system sys:utilities add\n"
  253.                   "LoadWB\n"
  254.                   "EndCLI >NIL:\n"
  255.                )
  256.             )
  257.          )
  258.          (
  259.             (while (set thisfile (select n "Prefs/Pointer"
  260.                                              "Prefs/Pointer.info"
  261.                                              "Prefs/Serial"
  262.                                              "Prefs/Serial.info"
  263.                                              "Prefs/Font"
  264.                                              "Prefs/Font.info"
  265.                                              "Prefs/IControl"
  266.                                              "Prefs/IControl.info"
  267.                                              "Prefs/Input"
  268.                                              "Prefs/Input.info"
  269.                                              "Prefs/Overscan"
  270.                                              "Prefs/Overscan.info"
  271.                                              "Prefs/Palette"
  272.                                              "Prefs/Palette.info"
  273.                                              "Prefs/Printer"
  274.                                              "Prefs/Printer.info"
  275.                                              "Prefs/PrinterGfx"
  276.                                              "Prefs/PrinterGfx.info"
  277.                                              "Prefs/ScreenMode"
  278.                                              "Prefs/ScreenMode.info"
  279.                                              "Prefs/Time"
  280.                                              "Prefs/Time.info"
  281.                                              "Prefs/WBPattern"
  282.                                              "Prefs/WBPattern.info"
  283.                                              "Libs/bullet.library"
  284.                                              "Libs/mathieeedoubtrans.library"
  285.                                              "Libs/mathieeesingtrans.library"
  286.                                              "Libs/mathtrans.library"
  287.                                              "Expansion"
  288.                                              "System/Fountain"
  289.                                              "System/Fountain.info"
  290.                                              "System/FixFonts"
  291.                                              "System/FixFonts.info"
  292.                                              "System/NoFastMem"
  293.                                              "System/NoFastMem.info"
  294.                                              "Utilities/Clock"
  295.                                              "Utilities/Clock.info"
  296.                                              "Utilities/Display"
  297.                                              "Utilities/Display.info"
  298.                                              "Utilities/Exchange"
  299.                                              "Utilities/Exchange.info"
  300.                                              "Utilities/Say"
  301.                                              "Utilities/Say.info"
  302.                                              "L/aux-handler"
  303.                                              "L/speak-handler"
  304.                                              "S/HDBackup.config"
  305.                                              "S/PickMap"
  306.                                              "S/Startup-sequence"
  307.                                              "S/Startup-sequence.HD"
  308.                                              "C/DiskChange"
  309.                                              "C/DiskDoctor"
  310.                                              "C/Edit"
  311.                                              "C/Lock"
  312.                                              "C/MagTape"
  313.                                              "C/Protect"
  314.                                              "C/RemRAD"
  315.                                              "C/Sort"
  316.                                              "C/Which"
  317.                                              "Devs/postscript_init.ps"
  318.                                              "Devs/narrator.device"
  319.                                              "Devs/DOSDrivers/PIPE"
  320.                                              "Devs/DOSDriversPIPE.info"
  321.                                              "Devs/DOSDrivers"
  322.                                              "Expansion.info"
  323.                                              ""))
  324.                (
  325.                   (set n (+ n 1))
  326.                   (working "Deleting file: " thisfile)
  327.                   (delete (tackon boot-dest thisfile) (optional "force"))
  328.                )
  329.             )
  330.  
  331.             (working "Building Startup-sequence script file...")
  332.             (textfile
  333.                (dest (tackon boot-dest "s/startup-sequence"))
  334.                (if (= make_boot 2)
  335.                   (
  336.                      (append
  337.                         "c:setpatch >NIL:\n"
  338.                         "c:version >NIL:\n"
  339.                         "addbuffers >NIL: df0: 15\n"
  340.                         "Resident >NIL: C:Execute PURE ADD\n"
  341.                         "makedir ram:T ram:Clipboards ram:env ram:env/sys\n"
  342.                         "copy >NIL: ENVARC: ram:env all quiet noreq\n"
  343.                         "assign ENV: ram:env\n"
  344.                         "assign T: ram:t ;set up T: directory for scripts\n"
  345.                         "assign CLIPS: ram:clipboards\n"
  346.                         "assign REXX: s:\n"
  347.                         "if exists sys:Monitors\n"
  348.                         "    join >NIL: sys:monitors/~(#?.info) as t:mon-start\n"
  349.                         "    execute t:mon-start\n"
  350.                         "    delete >NIL: t:mon-start\n"
  351.                         "endif\n"
  352.                         "BindDrivers\n"
  353.                         "setenv Workbench $Workbench\n"
  354.                         "setenv Kickstart $Kickstart\n"
  355.                         "Echo \"Terminus 2.0 boot disk Kickstart $Kickstart, Workbench $Workbench\"\n"
  356.                         "version\n"
  357.                         "IPrefs\n"
  358.                         "conclip\n"
  359.                         "path ram: c: sys:utilities sys:rexxc sys:system s: sys:prefs sys:wbstartup add\n"
  360.                         "LoadWB\n"
  361.                         "EndCLI >NIL:\n"
  362.                      )
  363.                   )
  364.                   (
  365.                      (append
  366.                         "C:SetPatch QUIET\n"
  367.                         "Version >NIL:\n"
  368.                         "AddBuffers >NIL: DF0: 15\n"
  369.                         "FailAt 21\n"
  370.                         "MakeDir RAM:T RAM:Clipboards RAM:ENV RAM:ENV/Sys\n"
  371.                         "Copy >NIL: ENVARC: RAM:ENV ALL NOREQ\n"
  372.                         "Assign >NIL: ENV: RAM:ENV\n"
  373.                         "Assign >NIL: T: RAM:T\n"
  374.                         "Assign >NIL: CLIPS: RAM:Clipboards\n"
  375.                         "Assign >NIL: REXX: S:\n"
  376.                         "Assign >NIL: PRINTERS: DEVS:Printers\n"
  377.                         "Assign >NIL: KEYMAPS: DEVS:Keymaps\n"
  378.                         "Assign >NIL: LOCALE: SYS:Locale\n"
  379.                         "IF NOT EXISTS SYS:Fonts\n"
  380.                         "  Assign FONTS:\n"
  381.                         "EndIF\n"
  382.                         "BindDrivers\n"
  383.                         "IF EXISTS DEVS:Monitors\n"
  384.                         "  List >NIL: DEVS:Monitors/~(#?.info) TO T:M LFORMAT \"DEVS:Monitors/%s\"\n"
  385.                         "  Execute T:M\n"
  386.                         "  Delete >NIL: T:M\n"
  387.                         "EndIF\n"
  388.                         "SetEnv Workbench $Workbench\n"
  389.                         "SetEnv Kickstart $Kickstart\n"
  390.                         "UnSet Workbench\n"
  391.                         "UnSet Kickstart\n"
  392.                         "IPrefs\n"
  393.                         "Echo \"Terminus 2.0 boot disk Kickstart $Kickstart, Workbench $Workbench\"\n"
  394.                         "version\n"
  395.                         "ConClip\n"
  396.                         "Path >NIL: RAM: C: SYS:Utilities SYS:Rexxc SYS:System S: SYS:Prefs SYS:WBStartup add\n"
  397.                         "LoadWB\n"
  398.                         "EndCLI >NIL:\n"
  399.                      )
  400.                   )
  401.                )
  402.             )
  403.             (if (not (exists (tackon boot-dest "fonts")))
  404.                (
  405.                   (makedir (tackon boot-dest "fonts"))
  406.                   (run "Assign FONTS: DF0:fonts")
  407.                )
  408.             )
  409.          )
  410.       )
  411.    )
  412. )
  413.  
  414. (complete 50)
  415.  
  416. (copyfiles
  417.    (source "Fonts")
  418.    (dest (tackon boot-dest "fonts"))
  419.    (all)
  420. )
  421.  
  422. (complete 60)
  423.  
  424. (set ver 0)
  425. (if (exists (tackon boot-dest "libs/asl.library"))
  426.    (
  427.       (set vernum (getversion (tackon boot-dest "libs/asl.library")))
  428.       (set ver (/ vernum 65536))
  429.    )
  430. )
  431.  
  432. (if (and (not (exists (tackon boot-dest "libs/req.library"))) (< ver 38))
  433.    (copyfiles
  434.       (source "Libs/req.library")
  435.       (dest (tackon boot-dest "libs"))
  436.    )
  437. )
  438.  
  439. (complete 70)
  440.  
  441. (if (not (exists (tackon boot-dest "libs/OwnDevUnit.library")))
  442.    (copyfiles
  443.       (source "Libs/OwnDevUnit.library")
  444.       (dest (tackon boot-dest "libs"))
  445.    )
  446. )
  447.  
  448. (complete 80)
  449.  
  450. (if (not (exists (tackon boot-dest "libs/xprkermit.library")))
  451.    (copyfiles
  452.       (source "Libs/xprkermit.library")
  453.       (dest (tackon boot-dest "libs"))
  454.    )
  455. )
  456.  
  457. (complete 90)
  458.  
  459. (if (not (exists (tackon boot-dest "libs/xprbplus.library")))
  460.    (copyfiles
  461.       (source "Libs/xprbplus.library")
  462.       (dest (tackon boot-dest "libs"))
  463.    )
  464. )
  465.  
  466. (complete 100)
  467.  
  468. (exit)
  469.  
  470.